test(dash): S8 stratum-binding contract KAT (extranonce2 nonce64-slot) - #630
Merged
Conversation
frstrtr
force-pushed
the
dash/s8-stratum-binding-kat
branch
from
July 4, 2026 00:39
c82bf56 to
9c20d38
Compare
This was referenced Jul 4, 2026
frstrtr
added a commit
that referenced
this pull request
Jul 4, 2026
Rebase-clean union of the #628-vs-#630 add_executable collision left target_link_libraries(test_dash_share_messages) opened but unterminated with add_executable(test_dash_stratum_binding) interleaved into it, producing CMake parse error at test/CMakeLists.txt:322 (missing ending ) and breaking configure on all platforms (macOS/Windows failed fast; Linux would follow). Split into two complete, separate target blocks. Configure clean; test_dash_stratum_binding builds; ctest 6/6.
This was referenced Jul 4, 2026
Fenced test-only slice: pins the get_work() -> stratum job BINDING contract (coinbase nonce64 / extranonce2 slot geometry + coinb1/coinb2 split and reassembly that partitions the miner search space) against oracle frstrtr/p2pool-dash @9a0a609 work.py:21,421,436-438. 6 KATs, all derived independently of the SUT (oracle contract + Python sha256d goldens): Extranonce2WidthOraclePin EXTRANONCE2_SIZE == COINBASE_NONCE_LENGTH == 8 SplitBoundaryGeometry coinb1=bytes[:off], coinb2=bytes[off+8:] ZeroNonceIsIdentity zero nonce reassembles gentx byte-for-byte (:437) SlotIsolation only the 8 slot bytes move across extranonce2 BindingInjectivity distinct extranonce2 -> distinct coinbase leaf GoldenLeafHashes independent sha256d byte-parity anchors Pure/socket-free/node-free (synthetic CoinbaseLayout, no dashd, no sharechain). Touches only test/ + build.yml allowlist -> IDENTIFIER-neutral, non-consensus, independently landable ahead of the migration GO. No self-merge.
Rebase-clean union of the #628-vs-#630 add_executable collision left target_link_libraries(test_dash_share_messages) opened but unterminated with add_executable(test_dash_stratum_binding) interleaved into it, producing CMake parse error at test/CMakeLists.txt:322 (missing ending ) and breaking configure on all platforms (macOS/Windows failed fast; Linux would follow). Split into two complete, separate target blocks. Configure clean; test_dash_stratum_binding builds; ctest 6/6.
frstrtr
force-pushed
the
dash/s8-stratum-binding-kat
branch
from
July 4, 2026 17:57
361d5d9 to
1e6f4cb
Compare
frstrtr
added a commit
that referenced
this pull request
Jul 16, 2026
…HWorkSource standup Closes the S8 "no run-path caller" gap: the DASHWorkSource IWorkSource seam (#706, 4a skeleton + 4b bodies) and the subscribe->notify->submit KATs (#630-634) had no production caller — a real main that constructs the work source and binds a core::StratumServer to it. This is that caller. - main_dash.cpp: --stratum [HOST:]PORT argv (SSOT parse_listen); threaded into run_node; node_coin_state -> DASHWorkSource -> StratumServer standup; won-block dispatch via the EXISTING dashd-RPC submitblock arm (rpc->submit_block_hex) — embedded P2P relay leg stays S8; UNARMED path logs loudly, never a silent drop. Destruction order: stratum_server declared before the work source it references; explicit reset() after ioc.run(). dashd-RPC fallback RETAINED (never removed). - src/c2pool/CMakeLists.txt: link dash_stratum into c2pool-dash (the 4b work_source.cpp bodies) — without it the executable failed to link (undefined DASHWorkSource ctor). Build-glue for the caller. Verified Linux x86_64: c2pool-dash links clean; --run --stratum 127.0.0.1:13333 stands up the acceptor (DASHWorkSource constructed, StratumServer bound, clean stop). subscribe->notify->submit binding is KAT-covered at the work_source seam (#630-634). No other-coin / shared- base edit; per-coin isolation held.
frstrtr
added a commit
that referenced
this pull request
Jul 16, 2026
…HWorkSource standup Closes the S8 "no run-path caller" gap: the DASHWorkSource IWorkSource seam (#706, 4a skeleton + 4b bodies) and the subscribe->notify->submit KATs (#630-634) had no production caller — a real main that constructs the work source and binds a core::StratumServer to it. This is that caller. - main_dash.cpp: --stratum [HOST:]PORT argv (SSOT parse_listen); threaded into run_node; node_coin_state -> DASHWorkSource -> StratumServer standup; won-block dispatch via the EXISTING dashd-RPC submitblock arm (rpc->submit_block_hex) — embedded P2P relay leg stays S8; UNARMED path logs loudly, never a silent drop. Destruction order: stratum_server declared before the work source it references; explicit reset() after ioc.run(). dashd-RPC fallback RETAINED (never removed). - src/c2pool/CMakeLists.txt: link dash_stratum into c2pool-dash (the 4b work_source.cpp bodies) — without it the executable failed to link (undefined DASHWorkSource ctor). Build-glue for the caller. Verified Linux x86_64: c2pool-dash links clean; --run --stratum 127.0.0.1:13333 stands up the acceptor (DASHWorkSource constructed, StratumServer bound, clean stop). subscribe->notify->submit binding is KAT-covered at the work_source seam (#630-634). No other-coin / shared- base edit; per-coin isolation held.
frstrtr
added a commit
that referenced
this pull request
Jul 16, 2026
…HWorkSource standup (#715) Closes the S8 "no run-path caller" gap: the DASHWorkSource IWorkSource seam (#706, 4a skeleton + 4b bodies) and the subscribe->notify->submit KATs (#630-634) had no production caller — a real main that constructs the work source and binds a core::StratumServer to it. This is that caller. - main_dash.cpp: --stratum [HOST:]PORT argv (SSOT parse_listen); threaded into run_node; node_coin_state -> DASHWorkSource -> StratumServer standup; won-block dispatch via the EXISTING dashd-RPC submitblock arm (rpc->submit_block_hex) — embedded P2P relay leg stays S8; UNARMED path logs loudly, never a silent drop. Destruction order: stratum_server declared before the work source it references; explicit reset() after ioc.run(). dashd-RPC fallback RETAINED (never removed). - src/c2pool/CMakeLists.txt: link dash_stratum into c2pool-dash (the 4b work_source.cpp bodies) — without it the executable failed to link (undefined DASHWorkSource ctor). Build-glue for the caller. Verified Linux x86_64: c2pool-dash links clean; --run --stratum 127.0.0.1:13333 stands up the acceptor (DASHWorkSource constructed, StratumServer bound, clean stop). subscribe->notify->submit binding is KAT-covered at the work_source seam (#630-634). No other-coin / shared- base edit; per-coin isolation held. Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fenced, test-only, non-consensus warm-lane slice (integrator-authorized on the [s=g1-vardiff-kat-pushed] thread as the next slice after #627).
What
Pins the get_work() -> stratum job binding contract — the coinbase nonce64 / extranonce2 slot geometry and the coinb1/coinb2 split+reassembly that partitions the miner search space. Complements #627/test_dash_work_job_targets (which pin the job target arithmetic) — this is the coinbase nonce-binding half of the same get_work() path.
Oracle
frstrtr/p2pool-dash @9a0a609 p2pool/work.py:21,421,436-438 (COINBASE_NONCE_LENGTH=8; coinb1 = gentx[:-payload-8-4]; zero-nonce reassembly == gentx). Non-circular: every expected value derived from the oracle contract or an independent Python sha256d, not from the SUT.
Coverage (6 KATs, all green locally)
Fencing / classification
Touches only test/test_dash_stratum_binding.cpp, test/CMakeLists.txt, and the build.yml test allowlist (x2). No prod/consensus code; pure/socket-free/node-free (synthetic CoinbaseLayout, no dashd, no sharechain). IDENTIFIER/PREFIX-neutral — a bucket-1 regression guard, not oracle-conformance mutation. Independently landable ahead of the migration GO. No self-merge — integrator verifies FULL gh CI rollup.